<!DOCTYPE html>
<html xmlns:layout="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
	layout:decorate="~{common/layout}">

<head>
	<meta charset="UTF-8">
	<title>消息中心</title>
	<style>
	 
	</style>
</head>

<body>
	<div layout:fragment="fragment_body">
		<div class="toolbar">
			<div style="margin-right: 12px; width: 220px;">
				<el-input placeholder="请输入内容"></el-input>
			</div>
			<div style="flex: 1 1 0%;">
				<el-button-group>
					<el-button @click="changeStatus(null)" :type="listStatus == null ?'primary':''"
						icon="Document">全部</el-button>
					<el-button @click="changeStatus(1)" :type="listStatus == 1 ?'primary':''"
						icon="CircleCheck">未读</el-button>
				</el-button-group>
			</div>
			<el-button type="danger" @click="openForm" icon="Remove">清空消息</el-button>
		</div>
		<el-empty description="暂无消息" v-if="list == null || list.length == 0"></el-empty>
		<el-table :data="list" v-if="list !== null && list.length > 0" border style="width: 100%;margin-top: 12px;">
			<el-table-column prop="srcNode.nodeCode" label="来源节点" rowspan="2"></el-table-column>
			<el-table-column prop="srcNode.nodeNet" label="来源节点"></el-table-column>
			<el-table-column prop="dstNode.nodeCode" label="合作节点"></el-table-column>
			<el-table-column prop="dstNode.nodeNet" label="合作节点"></el-table-column>
			<el-table-column prop="routeStatue" label="状态" width="100">
				<template #default="scope">
					<el-tag size="small" type="success" v-if="scope.row.routeStatus == 0">可用</el-tag>
					<el-tag size="small" type="danger" v-if="scope.row.routeStatus == 1">不可用</el-tag>
					<el-link :underline="false">
						<el-icon :size="20" color="green" @click="restatus(scope.row.routeId)">
							<Refresh></Refresh>
						</el-icon>
					</el-link>
				</template>
			</el-table-column>
			<el-table-column prop="nodeCreate" label="绑定时间" width="150"></el-table-column>
			<el-table-column prop="nodeCreate" label="操作" width="150">
				<template #default="scope">
					<el-button type="text" size="small" @click="delNode(scope.row.routeId)">解绑</el-button>
				</template>
			</el-table-column>
		</el-table>
	</div>
</body>
<script type="text/javascript" layout:fragment="fragment_script">
	const _data = {
		list: [],
		nodes: [],
		listStatus: null,
		
	}
	const _method = {
		changeStatus(val) {
			this.listStatus = val
		},
		
	}
	function _created() {
	}
	const _watch = {
		
	}
</script>

</html>